<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
		<title>个人资料</title>
		<link rel="stylesheet" href="__PUBLIC__/Home/css/common.css">
		<link rel="stylesheet" href="__PUBLIC__/Home/css/main.css">
		<script src="__PUBLIC__/Home/js/zepto.js"></script>
	</head>
	<body>
		<!--遮罩层-->
		<div id="zhezhao" style="display:none"></div>
		<!--更改头像 弹出的底部框-->
		<div id="gerenGaiTouxiang" class="botKuang2Area" style="display: none">
			<div class="contain maxWidth">
				<div class="operate">
					<ul>
						<li><a href="javascript:;">拍照</a></li>
						<li><a href="javascript:;">我的相册</a></li>
					</ul>
				</div>
				<div class="cancel">
					<a href="javascript:;">取消</a>
				</div>
			</div>
		</div>
		<!--正文区域-->
		<div id="gerenZiliaoTop" class="topBackTitle">
			<div class="contain maxWidth">
				<a class="hz back" href="javascript:;">&#xe600;</a>个人资料
			</div>
		</div>
		<div id="gerenZiliaoMain" class="fastscroll top50bot0">
			<div class="contain maxWidth">
				<ul class="ullist1line">
					<li class="h70">
						<a href="javascript:;">
							<div class="left">
								<span class="icon">
									<span class="hz">&#xe622;</span>
								</span><em>头像</em>
							</div>
							<div class="right">
								<span class="img con" style="background-image:url(__PUBLIC__/Home/img/geren/touxiang.png)"></span>
								<span class="hz">&#xe60c;</span>
							</div>
						</a>
					</li>
					<li>
						<a href="{:U('Index/edit',array('type'=>0))}">
							<div class="left">
								<span class="icon">
									<span class="hz">&#xe623;</span>
								</span><em>姓名</em>
							</div>
							<div class="right">
								<span class="con">{$user.name}</span><span class="hz">&#xe60c;</span>
							</div>
						</a>
					</li>
					<li class="sex">
						<a href="javascript:;">
							<div class="left">
								<span class="icon">
									<span class="hz">&#xe620;</span>
								</span><em>性别</em>
							</div>
							<div class="right">
								<span class="con">{$sexarr[$user['sex']]}</span><span class="hz">&#xe60c;</span>
							</div>
						</a>
					</li>
					<li>
						<a href="{:U('Index/upmobile')}">
							<div class="left">
								<span class="icon">
									<span class="hz">&#xe621;</span>
								</span><em>修改手机号</em>
							</div>
							<div class="right">
								<span class="hz">{$user.mobile}&#xe60c;</span>
							</div>
						</a>
					</li>
					<li>
						<a href="{:U('Index/editpass')}">
							<div class="left">
								<span class="icon">
									<span class="hz">&#xe61f;</span>
								</span><em>修改密码</em>
							</div>
							<div class="right">
								<span class="hz">&#xe60c;</span>
							</div>
						</a>
					</li>
					<li>
						<a href="{:U('UserAddress/index')}">
							<div class="left">
								<span class="icon">
									<span class="hz">&#xe60d;</span>
								</span><em>收货地址</em>
							</div>
							<div class="right">
								<span class="hz">&#xe60c;</span>
							</div>
						</a>
					</li>
					<li>
						<a href="{:U('Index/edit',array('type'=>1))}">
							<div class="left">
								<span class="icon">
									<span class="hz">&#xe624;</span>
								</span><em>邮编号码</em>
							</div>
							<div class="right">
								<span class="con">{$user.zip_code}</span><span class="hz">&#xe60c;</span>
							</div>
						</a>
					</li>
				</ul>
			</div>
		</div>

		<script>
			//返回按钮
			$('#gerenZiliaoTop .back').on('tap',function(){
				//window.history.go(-1);
				window.location.href='{:U('Index/index')}';
			});

			//获取参数
			var sexstr=[null,'男','女'];
			var hrefstr=location.href;
			if(hrefstr.indexOf('sex=')!=-1){
				var num=hrefstr.substring(hrefstr.indexOf('sex=')+4);
				$('#gerenZiliaoMain .ullist1line li.sex .right .con').text(sexstr[num]);
			}

			//点击 头像
			$('#gerenZiliaoMain .ullist1line li.h70').on('tap',function(){
				$('#zhezhao').css('display','block');
				$('#gerenGaiTouxiang').css('display','block');
			});

			//点击 底部弹出框 的取消
			$('#gerenGaiTouxiang .contain .cancel a').on('tap',function(){
				$('#zhezhao').css('display','none');
				$('#gerenGaiTouxiang').css('display','none');
			});

			//点击 性别 跳转到性别页面  男1 女2
			$('#gerenZiliaoMain .ullist1line li.sex').on('tap',function(){
				var text=$(this).find('.right .con').text();
				var num=null;
				if(text=='男'){
					num=1;
				}else if(text=='女'){
					num=2;
				}
				location.href='{:U('Index/sex')}&sex='+num;
				//location.href='我的个人资料修改性别.html?sex='+num;
			});
		</script>
	</body>
</html>
